1. Field of the Invention
The present invention relates to the technical field of voice data decoding and, more particularly, to a data simplifying and merging method for a voice decoding memory system.
2. Description of Related Art
For saving storage space, adaptive differential pulse code modulation (ADPCM) is frequently applied to process typical voice data before storage. FIG. 1 shows an ADPCM device. As shown, an 8-bit error signal e(n) is obtained by subtracting a previous voice signal ŝ(n) from an 8-bit input voice signal s(n). Next, a quantizer 100 quantizes the error signal e(n) and thus generates a 4-bit signal c(n) to output for storage. Next, a delay device 110 delays the 4-bit signal c(n). Then, the 4-bit signal c(n) is multiplied by a 4-bit step device 120 to obtain an 8-bit signal ŝ(n) for next subtraction as recited above. As such, only a quantized error signal is stored, thereby saving storage space.
The 4-bit signal c(n) after ADPCM coding is stored in a memory. When the 4-bit signal c(n) is to be used, as shown in FIG. 2, a multiplier 220 multiplies the signal c(n) by a 4-bit step device 200 to obtain an 8-bit signal d(n). Next, an adder 230 adds the 8-bit signal d(n) to a signal ŝ(n−1) and thus obtains an 8-bit signal ŝ(n). The original signal s(n) can be represented by the signal ŝ(n). The signal ŝ(n) is further delayed by a delay device 210 and thus generates a repeatedly delayed signal ŝ(n−1). However, the signal ŝ(n) is normally applied to lower-end products. Accordingly, upon the price consideration, the multiplier 220 in FIG. 2 seldom is used. Instead, the signal ŝ(n) is obtained by using a processor to look up a table. The 4-bit signal c(n) is stored in such a manner that two 4-bit signals c(n) are taken as a group for being stored in a byte, as shown in FIG. 3. The processor executes instructions shown in FIG. 4, thereby obtaining a pointer of the voice signal ŝ(n) at the lower four bits. A voice signal ŝ(n) is found by using the pointer to look up a predetermined table. Next, the processor executes instructions shown in FIG. 5, thereby obtaining a different pointer of the voice signal ŝ(n) at the upper four bits. Another voice signal ŝ(n) is found by using the different pointer to look up the predetermined table.
However, when the table is used to decode an ADPCM compression signal, it may occupy many processor resources. In addition, due to cost consideration, the processor may not be provided with multiplication instructions and Barrel Shift instruction (which can concurrently shift left or right n bits). Therefore, when the processor executes an instruction to shift right four bits, as shown in FIG. 5, it has to complete the instruction execution by shifting right four times, with one time one bit. Accordingly, the conventional ADPCM decoding method is not satisfactory and thus an improved data simplifying and merging method for a voice decoding memory system is desired.